/*
 * Node.h
 *
 *  Created on: Apr 18, 2009
 *      Author: wrice
 */

#ifndef NODE_H_
#define NODE_H_

#include "DOMCore.h"
namespace DOMCore {

class Node {
public:
	virtual DOMString getNodeName() = 0;
	virtual DOMString getNodeValue() throw(DOMExceptionPtr) = 0;
	virtual void setNodeValue(DOMString) throw(DOMExceptionPtr) = 0;

	virtual unsigned short getNodeType() = 0;
	virtual Node * getParentNode() = 0;
	virtual NodeList * getChildNodes() = 0;
	virtual Node * getFirstChild() = 0;
	virtual Node * getLastChild() = 0;
	virtual Node * getPreviousSibling() = 0;
	virtual Node * getNextSibling() = 0;
	virtual NamedAttrMap * getAttributes() = 0;
	virtual Document * getOwnerDocument() = 0;

	virtual Node * insertBefore( Node * newChild, Node * refChild ) throw(DOMExceptionPtr) = 0;
	virtual Node * replaceChild( Node * newChild, Node * oldChild ) throw (DOMExceptionPtr) = 0;
	virtual Node * removeChild( Node * oldChild) throw(DOMExceptionPtr) = 0;
	virtual Node * appendChild( Node * newChild) throw(DOMExceptionPtr) = 0;

	virtual bool hasChildNodes() = 0;
	virtual bool hasAttributes() = 0;

	// NodeType
	enum {
		ELEMENT_NODE = 1,
		ATTRIBUTE_NODE = 2,
		TEXT_NODE = 3,
		DOCUMENT_NODE = 9
	};

public: virtual ~Node() {}
};

}

#endif /* NODE_H_ */
